﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

public partial class Manage_MinPrice : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    { 
        if (string.IsNullOrEmpty(Request.QueryString["Company_Goods"]))
        {
            HZ.Web.WebUtil.Alert("获取数据错误,请联系管理员。", this); 
            return;
        }
        if (!IsPostBack) 
        { 
            BindData();
            Bind();
        }
    }
    //参考价格
    private void BindData()
    {
        string Company_goods = Request.QueryString["Company_Goods"].ToString();
        DataTable dt = BLL_Factory.IBLL_Company.GetMinprie(Company_goods);
        if (dt.Rows.Count > 0) 
        {
            lblLimitPrice.Text = dt.Rows[0]["LimitPrice"].ToString();
            lblLimitSource.Text = dt.Rows[0]["LimitSource"].ToString();
            lbQGBidPrice.Text = dt.Rows[0]["QGBidPrice"].ToString();
            lbQGBidPrice2.Text = dt.Rows[0]["QGBidPrice2"].ToString();
            lbHosMinPrice.Text = dt.Rows[0]["HosMinPrice"].ToString();
            //lbMinPriceHos.Text = dt.Rows[0]["MinPriceHos"].ToString();
            lbJkMinPrice.Text = dt.Rows[0]["JkMinPrice"].ToString();
            lbDiCengPrice.Text = dt.Rows[0]["DiCengPrice"].ToString();
            //lbDiCengXinXi.Text = dt.Rows[0]["DiCengXinXi"].ToString();

        }
    }

    protected void pager1_PageChanging(object sender, HZ.Web.PageChaningEventArgs e)
    {
        Bind();
    }
    //同招标单元拟中标价
    private void Bind()
    {
        int totalrecord;
        DataTable dt = BLL_Factory.IBLL_Company.GetSortGoodsPrice(Request["sortid"].ToString(), pager1.CurrentPage, pager1.PageSize, out totalrecord);
        pager1.RecordCount = totalrecord;
        gv1.DataSource = dt;
        gv1.DataBind();
    }
    //protected void btnkan_Click(object sender, EventArgs e)
    //{
    //    dvgw.Visible = true; 
    //}
}